package com.platform.service;

import com.platform.dao.ApiAccountMapper;
import com.platform.dao.ApiOrderMapper;
import com.platform.entity.TranferNewsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ApiAccountService {
    @Autowired
    private ApiAccountMapper accountDao;
    @Autowired
    private ApiOrderMapper orderMapper;

    public List<TranferNewsVo> querytranferByOrderSn(String order_sn) {
        return accountDao.querytranferByOrderSn(order_sn);
    }

    public int applyTranfer(TranferNewsVo tranferNewsVo) {
        accountDao.applyTranfer(tranferNewsVo);

        return orderMapper.updateTranStatus(tranferNewsVo.getOrder_sn());
    }

   }
